<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'bbTitleInfoAdd.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<script src="js/client_validate.js"></script>
<script type="text/javascript">

function check(){
	var titletile=document.getElementById("bbsTitle_titleTitle");
	if(trim(titletile.value)==""){
		document.getElementById("t_titletile").innerHTML="<font color='red'>标题不能为空</font>"
		titletile.focus();
		return false;
	}else{
		document.getElementById("t_titletile").innerHTML="";
	}
	
	var titleDetail=document.getElementById("bbsTitle_titleDetail")
	if(trim(titleDetail.value)==""){
		document.getElementById("t_titleDetail").innerHTML="<font color='red'>内容不能为空</font>"
		password.focus();
		return false;
	}else{
		document.getElementById("t_titleDetail").innerHTML="";
	}
	
	document.getElementById("bbsTitleInfo_add").submit();
}		
</script>
  </head>
  <form action="bbsTitleInfo_addInfo.do" method="post" id="bbsTitleInfo_add">
  <input  type="hidden" name="bbsTitleInfo.titleBlockid" value="${bbsTitleInfo.titleBlockid}"/>
  <body>
    <table>
    	<tr>
    		<td>标题</td>
    		<td>
    			<input type="text" style="width: 500px" name="bbsTitleInfo.titleTitle" id="bbsTitle_titleTitle" />
    			<span id="t_titletile"></span>
    		</td>
    	</tr>
    	<tr>
    		<td>内容</td>
    		<td>
    			<textarea rows="15" cols="60" name="bbsTitleInfo.titleDetail" id="bbsTitle_titleDetail">
				</textarea>
				<span id="t_titleDetail"></span>
    		</td>
    	</tr>
    	<tr>
    		<td><input type="button" value="提交" onclick="check()"> </td>
    		<td><input type="reset" > </td>
    	</tr>
    </table>
   </form>
  </body>
</html>
